Jonas Ådahl [Tue, 1 Oct 2019 10:07:03 +0000 (12:07 +0200)]
introspect: Add AnimationsEnabled property
While the gsetting is available for all who needs it, the Shell might
override it given various hueristics. Expose the decision made by the
Shell via a new property.
Intended to be used by gsd-xsettings as well as xdg-desktop-portal-gtk.
This also add a version property to the API, so that semi external
services (xdg-desktop-portal-gtk) can detect what API is expected to be
present.
Jonas Ådahl [Tue, 1 Oct 2019 09:56:34 +0000 (11:56 +0200)]
st/settings: Add API to inhibit animations
There may be situations where we shouldn't enable animations. Make it
possible for the Shell to decide when there are such situations and in
when needed inhibit animations.
Daniel van Vugt [Fri, 14 Feb 2020 10:24:58 +0000 (18:24 +0800)]
iconGrid: Create icon clones in a separate loop
For reasons not yet fully understood, `Main.uiGroup.add_actor` takes around
10 milliseconds to complete.
Because of this, each `actor.opacity = 0` has a good chance of falling
on a different frame. And when it does, `_opacityChangedId` also lands
on multiple different frames each incurring a separate relayout cycle.
It is this excessive number of relayouts that causes stuttering in the
icon grid animation (#2065). But it is the slowness of `uiGroup.add_actor`
that causes the number to be excessive when it should be one.
By creating the clones and adding them to `uiGroup` early, we then enable
the existing loop starting the animation to complete within a single frame.
And by completing within a single frame all the opacity changes land within
the same frame interval, thus incurring only a single relayout instead of
many.
This issue went unnoticed until 004a5e1042 (!704), after which the slow
emissions of `notify::opacity` became a more visible performance problem.
Jonas Dreßler [Wed, 19 Feb 2020 08:49:36 +0000 (09:49 +0100)]
theme: Make the focus state of buttons a bit more visible
This changed with the theme refactor was probably not intended, so make
the border on key-focused buttons a bit less transparent to make it
easier to see.
Now that the bind constraint changes the preferred size of
the actor, a major flaw in the AppDisplay code was exposed:
the folder dialog depends on the preferred size of a parent,
and the parent depends on the preferred size of the folder
dialog.
While we know this is not actually true, we shouldn't rely
on broken behavior to achieve this result. What's interesting
is that the bind constraint used by the folder dialog is a
relic of the development phase; we now control the position
and size of the dialog with a combination of CSS, and alignment.
Jonas Dreßler [Sun, 16 Feb 2020 20:57:34 +0000 (21:57 +0100)]
dateMenu: Hide overlay scrollbar in the notification popup
Since the design of the notification popup changed with the theme
refactor and there are now boxes around the world-clock and weather
sections, the overlay scrollbar that is shown above them looks rather
bad. So simply hide that scrollbar, we still have the vfade effect to
indicate the container is scrollable and we also depend on that in the
new popup app-folders.
Feichtmeier [Wed, 19 Feb 2020 09:36:23 +0000 (10:36 +0100)]
Style looking-glass $variant independant
- use osd colors
- also fix the toolbar buttons jumping on click
- adding better unchecked/hover/checkedifferences
- use $link_color for links
- remove the strong text-shadow
Jonas Dreßler [Wed, 19 Feb 2020 10:53:05 +0000 (11:53 +0100)]
lookingGlass: Also handle null objects in objectToString
Whoops, while ff4623454 fixed the handling of `undefined` objects,
`null` objects obviously still don't have a toString() method. So also
handle those and return 'null' in case the object is null.
Jonas Dreßler [Tue, 18 Feb 2020 22:21:52 +0000 (23:21 +0100)]
workspace: Ensure style of window-chrome titles before requesting width
Make sure the stylesheet properties of the window-chrome title are
updated before requesting the preferred width of the title to prevent
size changes of the title after we animated the width.
Jonas Dreßler [Sun, 16 Feb 2020 22:03:14 +0000 (23:03 +0100)]
userWidget: Simplify icon size setting a bit
Remove the default icon size of -1 and always set the container StBin to
a real size. This fixes an error where the "width" and "height"
properties get set to -2 (which is -1 * scaleFactor) in the `_init`
function.
Jonas Dreßler [Tue, 18 Feb 2020 14:05:57 +0000 (15:05 +0100)]
keyboard: Plug a leak of KeyboardControllers
To make sure the GC really disposes the KeyboardController object we
need to remove all references to the object, which means we have to
disconnect signals the object connects to, too.
This also fixes a bug where keys remain pressed forever and thus also
break that key on real keyboards. It happens if the OSK gets destroyed
during an OSK-key is being held so the StButton of the key is not
released. That means the key remains pressed in the
MetaVirtualInputDevice that we are now leaking because
KeyboardController isn't garbage collected.
Florian Müllner [Fri, 14 Feb 2020 15:10:34 +0000 (16:10 +0100)]
js: Don't use templates in files with translations
xgettext gained some support for template strings, and no longer
fails when encountering '/' somewhere between backticks.
Unfortunately its support is still buggy as hell, and it is now
silently dropping translatable strings, yay. I hate making the
code worse, but until xgettext really gets its shit together,
the only viable way forward seems to be to not use template
strings in any files listed in POTFILES.
Jonas Dreßler [Mon, 17 Feb 2020 18:59:31 +0000 (19:59 +0100)]
dialogs: Use a smaller font-size if the title width exceeds the space
Since quite a few strings of dialogs provided by external programs are
not updated yet and the string freeze is already in effect, make sure we
don't break those dialogs by stripping aways large parts of the
headline.
To do that, detect if the title label is larger than the available width
and if it is, switch to a smaller font-size of 13pt. This makes sure we
still show about the same number of characters in the headline as we did
in previous releases.
Florian Müllner [Fri, 14 Feb 2020 21:26:56 +0000 (22:26 +0100)]
screenShield: Always deactivate when interrupting idle before lock
With the old screen shield, we were simply hiding the lightboxes to show
the shield when the user became active after activating the shield but
before locking the screen (that is, when using a lock-delay).
However now that the shield is gone, we end up showing the unlock dialog
even though we are not actually locked.
We probably don't want to add back a shield-like mode (that is, a way to
raise the unlock dialog without authentication when we aren't locked),
so just deactivate the whole shield when the user becomes active again
before the lock kicks in.
Jonas Dreßler [Fri, 14 Feb 2020 21:11:27 +0000 (22:11 +0100)]
Update hint texts of all entries
The design team discussed the ellipses at the end of the hint text of
our entries and, even though they are present in most mockups, it turned
out they don't like them, so remove them.
It also turned out they don't like the prefixes like "Enter" before it,
so remove those, too.
Jonas Dreßler [Tue, 4 Feb 2020 18:24:43 +0000 (19:24 +0100)]
networkAgent: Update dialog entry descriptions for new design
With the new dialog design the descriptions of entries are now
implemented as hint-text of the StEntry. That means the colon at the end
of the descriptions no longer makes sense and should be removed.
Florian Müllner [Fri, 14 Feb 2020 19:19:37 +0000 (20:19 +0100)]
unlock: Don't show prompt on shifty key presses
Shift, caps-lock and friends change the capitalization of following
key presses. It is unexpected for those keys to have side-effects,
so don't switch to the prompt when they are pressed.
Florian Müllner [Fri, 14 Feb 2020 20:10:04 +0000 (21:10 +0100)]
authPrompt: Use placeholder label to avoid layout changes
We don't want to show a caps-lock warning when showing a non-password
entry, but we also don't want the layout to jump when changing the
label's visibility.
Achieve that by inserting an empty placeholder label that we can
show whenever the caps-lock warning is hidden.
Florian Müllner [Fri, 14 Feb 2020 19:50:59 +0000 (20:50 +0100)]
Revert "authPrompt: Don't hide the caps lock warning label"
Using the opacity to control the label's visibility doesn't work
correctly, as CapsLockWarning itself changes the opacity when
the caps-lock state changes.
Right now, it's still a label displayed following the same
layout algorithm of the cog button in the login screen. It'll
become a button later in the patchset.
Jakub Steiner [Thu, 13 Feb 2020 20:13:49 +0000 (21:13 +0100)]
theme: Lock screen notification style tweaks
- use standard border radius for notifications
- negative space pills for counters
- no border, slightly less opaque background allowed
by the massive blur radius for the wallpaper
Usually, logging in or unlocking the session is made asynchronously,
and AuthPrompt properly manages which entry is currently visible.
External code don't rely on any specific entry to be set, since it
is AuthPrompt's responsibility to select the correct one to be shown.
However, there's one specific case where AuthPrompt must preserve
the password entry: on reset. The reset code preserved whatever
entry was currently displayed, but after fe69dacaf1, it always
changes to the username entry.
loginDialog: Hide session menu button when showing the user list
In the past, the session menu button was part of the auth prompt widgetry,
so we didn't have to manually hide it when showing the user list. However,
now it is part of the login screen itself.
Hide the session menu button when the user list is shown.
Florian Müllner [Thu, 13 Feb 2020 18:06:51 +0000 (19:06 +0100)]
unlockDialog: Only show count for multiple notifications
In the common case where we only have a single unread notification
from a particular app, the count doesn't add useful information.
Reduce clutter a bit by only showing the notification count if we
have at least two.
Florian Müllner [Tue, 11 Feb 2020 18:35:22 +0000 (19:35 +0100)]
unlockDialog: Show unlock hint on inactivity
Inactivity on the unlock screen can be an indication that the user
doesn't know how to get to the auth prompt. Fade in a small hint
that points them in the right direction.
Florian Müllner [Tue, 11 Feb 2020 16:46:11 +0000 (17:46 +0100)]
unlockDialog: Support clock/prompt switching via scrolling
SwipeTracker "only" handles touch gestures and smooth scrolling.
Scrolling still makes sense for regular mice as well though, so
add handling for that as well.
Florian Müllner [Sun, 2 Feb 2020 11:23:32 +0000 (12:23 +0100)]
unlockDialog: Add swipe gesture
Clicking or typing to reveal the auth prompt are good options for
mouse/keyboard workflows, but awkward on touch devices. Now that
we have SwipeTracker, adding corresponding gestures support is
easy, so do just that.